package bunting.carl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;

@Service
public class EntryPoint {

	@Resource private String message = null; 
	
	private static final Logger LOGGER = LoggerFactory.getLogger(EntryPoint.class);
	
	private void run() throws Exception {
		LOGGER.debug(this.message);
	}
	
	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
		EntryPoint decodeLogs = applicationContext.getBean("entryPoint", EntryPoint.class);
		//ThreadPoolTaskExecutor executor = applicationContext.getBean("executor", ThreadPoolTaskExecutor.class);
		try {
			decodeLogs.run();
		} catch (Exception e) {
			LOGGER.error("error in run", e);
		}
		//executor.shutdown();
	}

}
